package com.cafeauto.socketio;

import java.io.Serializable;
import java.util.Date;

import com.efast.cafe.util.date.DateUtils;

/**
 * socket io 消息推送出去格式
 * @author fxm
 *
 */
public class SocketOutData implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private String messageId;
	
	private String processTime;
	
	private boolean success=true;
	
	private String busObject;
	
	private String errorCode="";
	
	private String errorMessage="";
	
	public SocketOutData(String messageId,String busObject,boolean success){
		this.messageId = messageId;
		this.busObject = busObject;
		this.success = success;
		this.processTime = DateUtils.format(new Date(), DateUtils.FORMAT_DATE_YYYY_MM_DD_HH_MM_SS);
	}
	
	public SocketOutData(SocketIOData data){
		this.messageId = data.getId();
		this.busObject = data.getBusObject();
		this.success = data.isSuccess();
		this.processTime = DateUtils.format(new Date(), DateUtils.FORMAT_DATE_YYYY_MM_DD_HH_MM_SS);
	}

	public String getMessageId() {
		return messageId;
	}

	public void setMessageId(String messageId) {
		this.messageId = messageId;
	}

	public String getProcessTime() {
		return processTime;
	}

	public void setProcessTime(String processTime) {
		this.processTime = processTime;
	}

	public String getBusObject() {
		return busObject;
	}

	public void setBusObject(String busObject) {
		this.busObject = busObject;
	}

	public boolean getSuccess() {
		return success;
	}

	public void setSuccess(boolean success) {
		this.success = success;
	}

	public String getErrorCode() {
		return errorCode;
	}

	public void setErrorCode(String errorCode) {
		this.errorCode = errorCode;
	}

	public String getErrorMessage() {
		return errorMessage;
	}

	public void setErrorMessage(String errorMessage) {
		this.errorMessage = errorMessage;
	}

	
	
	
}
